﻿@{
    var requierd = string.Empty;
    if(Model.ExtendRuleValues!=null && Model.ExtendRuleValues.Count > 0)
    {
        var listrulevalues= Model.ExtendRuleValues as List<InputStyleRule>;
        var requiredModel= listrulevalues.Where(a => a.Type== ValidateType.Required.ToString()).FirstOrDefault();
        if (requiredModel!=null)
        {
            requierd = requiredModel.Message;
        }
    }
    <div class="layui-form-item">
                <label class="layui-form-label @(!string.IsNullOrEmpty(requierd)?"layui-form-required":"")">@Model.DisplayName</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
                        <button type="button" class="pear-btn pear-btn-md" id="mulv_@Model.AttributeName"><i class="icon pear-icon pear-icon-upload"></i>添加视频</button>
                        <label style="color:orangered;">附件视频(mp4格式)。</label>
                        <div>
                            <table class="layui-table" id="upload_file_list_@Model.AttributeName">
                                <colgroup>
                                    <col >
                                    <col width="120">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>名称</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @if (ViewBag.FileList != null)
                                    {
                                        foreach (var item in ViewBag.FileList)
                                        {
                                            <tr>
                                                <td>
                                                    <input type="hidden" value="@item["id"]" />
                                                    <a href="@item["fpath"]" target="_blank">@item["fname"]</a>
                                                </td>
                                                <td><span class="layui-badge trdel">删除</span></td>
                                            </tr>
                                        }
                                    }

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
}
